<?php

namespace IdaasClient\Utils;

use App\Utils\UserUtil;
use Grpc\Base\Idaas\V1\GetPoolByPoolIdRequest;
use Grpc\Base\Idaas\V1\GetPoolByPoolIdResponse;
use Grpc\Base\Idaas\V1\GetUserPermissionsRequest;
use Grpc\Base\Idaas\V1\GetUserPermissionsResponse;
use Grpc\Base\Idaas\V1\IdaasClient;
use Grpc\Base\Idaas\V1\ParseAccessTokenRequest;
use Grpc\Base\Idaas\V1\ParseAccessTokenResponse;
use Hyperf\Grpc\StatusCode;
use Hyperf\GrpcClient\Exception\GrpcClientException;
use Hyperf\Cache\Annotation\Cacheable;
use Hyperf\GrpcServer\Exception\GrpcException;
use Hyperf\Utils\Codec\Json;
use Hyperf\Utils\Network;
use Hyperfx\Utils\ProtobufUtil;

class IdaasUtil {
    public static function inArray(array $needles, array $haystack): bool {
        foreach ($needles as $needle) {
            if (in_array($needle, $haystack)) {
                return true;
            }
        }
        return false;
    }
}